package generics;

import java.awt.Color;
import java.awt.Dimension;
import java.awt.Point;

/**
 * This abstract class is a subclass of AbstractMover that belongs to a group.
 * 
 * @author jianweigan
 *
 */
public class AbstractGroupMember extends AbstractMover {

	private AbstractGroup myGroup;

	public AbstractGroupMember(AbstractGroup group, Point center,
			Dimension size, Point velocity, Color color, String type,
			int trailSize) {
		super(center, size, velocity, color, type, trailSize);
		myGroup = group;
	}

	/**
	 * Need this get to let subclasses access the group they belong to
	 */
	public AbstractGroup getGroup() {
		return myGroup;
	}

	/**
	 * Need this set to allow subclasses to set their group
	 */
	public void setGroup(AbstractGroup group) {
		myGroup = group;
	}
}
